package com.shievy.anweb.common.service

import android.content.Context
import android.os.Bundle
import androidx.fragment.app.Fragment


/**
 * WebView 暴露入口
 * */
interface WebViewService {

    /**
     * 打开Fragment页面
     * */
    fun openFragmentPage(
        cxt: Context,
        url: String = "",
        title: String = "",
        isShowBar: Boolean = false
    )

    /**
     * 打开Fragment页面
     * */
    fun openFragmentPage(cxt: Context, bundle: Bundle = Bundle())

    /**
     * 返回WebView Fragment
     * */
    fun getWebViewFragment(url: String = "", bundle: Bundle = Bundle()): Fragment

    /**
     * 加载Asset文件
     * */
    fun loadAssetsFile(
        cxt: Context,
        filePath: String,
        title: String = "",
        isShowBar: Boolean = false
    )

}